package com.example.myapplication2.app;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

/**
 * Created with IntelliJ IDEA.
 * User: Dean.Hwang
 * Date: 2016/2/14
 * Time: 17:09
 * Description://TODO
 */
public class ReturnTitleLayout extends LinearLayout {
    public ReturnTitleLayout(final Context context, AttributeSet attrs) {
        super(context, attrs);
        LayoutInflater.from(context).inflate(R.layout.returnltitle, this);
        Button titleBack = (Button) findViewById(R.id.return_title_back);
        titleBack.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                ((Activity) getContext()).finish();
            }
        });
    }

}
